Fitting over and undercoupled resonators in reflection

Ql: loaded quality factor, Qc: coupling quality factor, Qi: internal quality factor. overcoupled regime: Qc<Qi, for Qc<<Qi we have Qc~Ql and the S11 shows only a phase signal.


In [76]:
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from IPython.display import display
%matplotlib inline

Case1: Undercoupled resonator Qc>Qi

First, we generate some fake data which we can fit later:


In [77]:
from resonator_tools import circuit
fr = 7e9  #resonance frequency in Hz
Qi = 200e3
Qc = 400e3
freq = np.linspace(fr-0.5e6, fr+0.5e6, 1000)
port1 = circuit.reflection_port()  #define a reflection port
noise = np.random.normal(loc=1.0,scale=0.01,size=(len(freq),))
S11 = noise * port1._S11_directrefl(freq,fr=fr,Ql=Qi*Qc/(Qc+Qi),Qc=Qc,a=1.,alpha=0.,delay=.0)
port1.add_data(freq,S11)

Let's plot the data:


In [78]:
plt.rcParams["figure.figsize"] = [10,5]
port1.plotrawdata()


...and fit it: (since we know the electric delay, we tell it the program, this makes it more accurate)


In [79]:
port1.autofit(electric_delay=0.)

...and plot the result:


In [80]:
port1.plotall()


Next, let us have a look at the fit results. Here, we convert the dictionary of results into a dataframe to display it in a nicer way.


In [81]:
display(pd.DataFrame([port1.fitresults]).applymap(lambda x: "{0:.2e}".format(x)))


Qc Qc_err Qi Qi_err Ql Ql_err chi_square fr fr_err theta0
0 3.99e+05 1.24e+03 1.99e+05 1.11e+03 1.33e+05 5.89e+02 9.29e-05 7.00e+09 9.64e+01 -4.21e-04

Finally, we can calculate the single photon limit, i.e., the input power necessary to maintain one photon on average in the resonator:


In [82]:
print 'Single photon limit: %.2f dBm' % port1.get_single_photon_limit()


Single photon limit: -149.38 dBm

Or, we can compute the photons in the resonator for a given power:


In [83]:
print 'At -100dBm, we have %.2e photons in the resonator' % port1.get_photons_in_resonator(-100)


At -100dBm, we have 8.68e+04 photons in the resonator

Case2: Strongly over coupled resonator Qc<<Qi

Here, we study the case where internal losses become negigible, and the amplitude signal vanishes.

First, we generate some fake data which we can fit later:


In [84]:
from resonator_tools import circuit
fr = 7e9  #resonance frequency in Hz
Qi = 10000e3
Qc = 100e3
freq = np.linspace(fr-0.5e6, fr+0.5e6, 1000)
port2 = circuit.reflection_port()  #define a reflection port
noise = np.random.normal(loc=1.,scale=0.04,size=(len(freq),))
S11 = noise * port1._S11_directrefl(freq,fr=fr,Ql=Qi*Qc/(Qc+Qi),Qc=Qc,a=1.,alpha=0.,delay=.0)
port2.add_data(freq,S11)

Let's plot the data:


In [85]:
port2.plotrawdata()


Here, we see that the amplitude signal completely vanishes in the noise

Fit the signal:

IMPORTANT: In the presence of a lot of noise, it is necessary to specify the electric delay by hand


In [86]:
port2.autofit(electric_delay=0.)


WARNING: Lorentz fit failed, trying phase fit

...and plot the result:


In [87]:
port2.plotall()


Next, let us have a look at the fit results. Here, we convert the dictionary of results into a dataframe to display it in a nicer way.


In [88]:
display(pd.DataFrame([port2.fitresults]).applymap(lambda x: "{0:.2e}".format(x)))


Qc Qc_err Qi Qi_err Ql Ql_err chi_square fr fr_err theta0
0 1.00e+05 3.88e+02 9.57e+06 3.65e+06 9.90e+04 5.59e+02 1.64e-03 7.00e+09 1.36e+02 -2.84e-03

Finally, we can calculate the single photon limit, i.e., the input power necessary to maintain one photon on average in the resonator:


In [89]:
print 'Single photon limit: %.2f dBm' % port2.get_single_photon_limit()


Single photon limit: -152.84 dBm

Or, we can compute the photons in the resonator for a given power:


In [90]:
print 'At -100dBm, we have %.2e photons in the resonator' % port2.get_photons_in_resonator(-100)


At -100dBm, we have 1.92e+05 photons in the resonator